package com.cw.auth.application.convert;

import com.cw.auth.application.dto.AuthPermissionDTO;
import com.cw.auth.application.dto.AuthRolePermissionDTO;
import com.cw.auth.domain.entity.AuthPermissionBO;
import com.cw.auth.domain.entity.AuthRolePermissionBO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper
public interface AuthRolePermissionDTOConverter {
    AuthRolePermissionDTOConverter INSTANCE = Mappers.getMapper(AuthRolePermissionDTOConverter.class);

    List<AuthRolePermissionDTO> convertBoToDTOList(List<AuthRolePermissionBO> authRolePermissionBOList);

    // 通过AuthRolePermissionDTO转化为AuthRolePermissionBO
    AuthRolePermissionBO convertDtoToBO(AuthRolePermissionDTO authRolePermissionDTO);

    AuthRolePermissionDTO convertBoToDTO(AuthRolePermissionBO authRolePermissionBO);
}
